package FileClass_etc.Exer;

import java.io.File;

/**
 * @author Jimmy Zhan WORKSTATION
 * @date 2023/3/28 16:27
 * 说明：创建一个与 hello.txt文件在相同文件目录下的另一个名为abc.txt文件
 */

public class Exer_01 {
    public static void main(String[] args) {
        File file1 = new File("hello.txt");
        System.out.println(file1.getAbsolutePath());

        System.out.println(file1.getAbsoluteFile().getParent());
        String parentPath = file1.getAbsoluteFile().getParent();
        File file2 = new File(parentPath, "abc.txt");
        System.out.println(file2.getAbsolutePath());
    }
}
